<template>
	<div class="max" style="background: #F5F5F5;">
		<my-header>
			<div slot="title">
				我的
			</div>
		</my-header>
		<div class="cont">
			<kinsfolk v-if="access=='kinsfolk'"></kinsfolk>
			<teacher v-else :type="access"></teacher>
		</div>
		<div class="weui-mask" v-if="custom==='true'">
			<div class="weui-dialog">
				<div class="weui-dialog__hd"><strong class="weui-dialog__title">提示</strong></div>
				<div class="weui-dialog__bd">您还未注册，请先进行注册</div>
				<div class="weui-dialog__ft">
					<div href="javascript:" class="weui-dialog__btn weui-dialog__btn_primary" @click="$router.push('/addChildren')">去注册</div>
					<div href="javascript:" class="weui-dialog__btn weui-dialog__btn_default" @click="cancel">取消</div>
				</div>
			</div>
		</div>
		<my-foot tab="/myself"></my-foot>
	</div>
</template>
<script>
	import myFoot from '@/components/Footer.vue'
	import teacher from './teacher/index.vue'
	import kinsfolk from './kinsfolk/index.vue'
	import wx from "weixin-js-sdk";
	export default {
		components: {
			myFoot,
			teacher,
			kinsfolk,
		},
		data() {
			return {
				custom: this.$Cookies.get('custom'),
				access: '',
			}
		},
		methods: {
			cancel() {
				// wx.closeWindow();
				this.$router.push('/home')
			}
		},
		created() {
			this.access = this.$Cookies.get('loginType');
			// kindergarten
			// classMaster
			// teacher
			// kinsfolk
		}
	}
</script>

<style>
	.df {}
</style>
